package com.ziyucoding.springboot.labs.redislike.common;

import lombok.Getter;

/**
 * 返回编码
 *
 * @author ziyucoding
 * @date 2023-02-07
 **/
@Getter
public enum ResponseCode {

    SUCCESS(0, "SUCCESS"),
    ERROR(1, "ERROR"),
    ARGUMENT_ILLEGAL(10, "ARGUMENT_ILLEGAL"),
    NEED_LOGIN(11, "NEED_LOGIN"),
    PAGE_OUT_RANGE(12, "PAGE_OUT_RANGE"),
    TOKEN_INVALID(13, "TOKEN_INVALID");

    private final int code;
    private final String name;

    ResponseCode(int code, String name) {
        this.code = code;
        this.name = name;
    }

}
